/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package TO;

import java.io.Serializable;
import java.util.Observable;

/**
 *
 * @author admin-pc
 */
public class BookTO extends Observable implements Serializable {

    private int bookId;
    private String bookTitle;
    private String bookStatus;

    public BookTO() {
    }

    public BookTO(int id, String bookstatus) {
        this.bookId = id;
        this.bookStatus = bookstatus;
        bookChanged();
    }

    public void bookChanged() {
        setChanged();
        notifyObservers();
    }

    public BookTO(int bookId, String bookTitle, String bookStatus) {
        this.bookId = bookId;
        this.bookTitle = bookTitle;
        this.bookStatus = bookStatus;
        bookChanged();
    }

    public BookTO(String bookTitle, String bookStatus) {
        this.bookTitle = bookTitle;
        this.bookStatus = bookStatus;
        bookChanged();
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
        bookChanged();
    }

    public void setBookTitle(String bookTitle) {
        this.bookTitle = bookTitle;
        bookChanged();
    }

    public void setBookStatus(String bookStatus) {
        this.bookStatus = bookStatus;
        bookChanged();
    }

    public int getBookId() {
        return bookId;
    }

    public String getBookTitle() {
        return bookTitle;
    }

    public String getBookStatus() {
        return bookStatus;
    }

    public boolean equals(BookTO bookTO) {
        return bookTO.bookId == this.bookId;
    }

}
